package com.xhkj.dao;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

import com.xhkj.model.MyFaceLibRecogData;
public interface MyFaceLibRecogDataDao extends JpaRepository<MyFaceLibRecogData, Long> {
	@Query(value=" select * from my_face_lib_recog_data where my_state = ?1 limit 150000 ",nativeQuery = true)
	public List<MyFaceLibRecogData> getListByState(int state);
	@Query(value="select count(id) from MyFaceLibRecogData where myState = ?1")
	public int getCountState(int state);
	@Transactional
	@Query(value = "delete from MyFaceLibRecogData  where myState = ?1")
	@Modifying
	int deleteByState(int state);
}